/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package slisfx.screens;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import slisfx.Globals;
import slisfx.resources.Load;

/**
 *
 * @author senior_design
 */
public class AddRemoveModViewFX extends Application implements Globals {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
    
    @Override
    public void start(final Stage primaryStage) {
        try {
            primaryStage.setTitle("Devices");
            primaryStage.setResizable(false);

            BorderPane mainWindow = new BorderPane();

            /* Here we can add images instead of Rectangle in the Future*/

            mainWindow.setTop(new Rectangle(830,50, Color.BLACK));
            mainWindow.setBottom(new Rectangle(830,50, Color.BLACK));
            mainWindow.setLeft(new Rectangle(50,350, Color.BLACK));
            mainWindow.setRight(new Rectangle(50, 350, Color.BLACK));

            VBox mainMenu = new VBox();
            mainMenu.setPadding(new Insets(10, 10, 10, 10));
            mainMenu.setSpacing(40);
            Text title = new Text("                                                         These features are coming soon!");
            title.setFont(Font.font("Amble CN", FontWeight.BOLD, 14));
            title.setFill(Color.WHITE);
            

            Image image = new Image(new Load().loadFile("gray.png"));
            Image image1 = new Image(new Load().loadFile("NASA_IVV1_sm.png"));
            Image image2 = new Image(new Load().loadFile("WVU_LOGO_sm.png"));

            //This is for the background
            StackPane stackPane = new StackPane();

            //This is for horizantal layout.
            HBox imageBox = new HBox();
            imageBox.setPadding(new Insets(10, 10, 10, 200));
            imageBox.setSpacing(100);

            //This is a function for Images
            ImageView iv1BackGround = new ImageView();
            ImageView iv2 = new ImageView();
            ImageView iv3 = new ImageView();
            iv1BackGround.setImage(image);
            iv2.setImage(image1);
            iv3.setImage(image2);
            Button btn = new Button();
            btn.setText("Return");
            btn.setOnAction(new EventHandler<ActionEvent>() {

                @Override
                public void handle(ActionEvent event) {
                    new DeviceOptionsViewFX().start(primaryStage);
                }
            });
            
            imageBox.getChildren().addAll(iv2, iv3);
            
            HBox buttons = new HBox();
            buttons.setPadding(new Insets(10, 10, 10, 330));
            buttons.setSpacing(30);
            buttons.getChildren().addAll(btn);
            
            mainMenu.getChildren().addAll(title, imageBox, buttons);
            
            stackPane.getChildren().addAll(iv1BackGround, mainMenu);
            mainWindow.setCenter(stackPane);

            primaryStage.setScene(new Scene(mainWindow, WIDTH, HEIGHT));
            primaryStage.show();
        } catch (IOException ex) {
            Logger.getLogger(AddRemoveModViewFX.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
